<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
        function method01(){
            console.log(window.navigator.userAgent);
        }

        function method02(){
            if(window.navigator.cookieEnabled){
                console.log('没有禁用cookie');
            }else{
                console.log('禁用cookie');
            }
        }

    </script>

</head>
<body>
<button onclick="method01()">获取浏览器的信息</button><br>
<button onclick="method02()">是否禁用cookie</button><br>

</body>
</html>